package com.net.oil.main.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.main.contract.FeedbackContract;
import com.net.oil.main.model.FeedbackModel;

/**
 * 作者：lch
 * 时间：2018/4/30 0030:下午 18:16
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class FeedbackPresenter extends BasePresenter<FeedbackContract.View> implements FeedbackContract.Presenter {

    private FeedbackContract.View view;
    private FeedbackContract.Model model;

    public FeedbackPresenter(FeedbackContract.View view) {
        this.view = view;
        model = new FeedbackModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void commitFeedback(String content) {
        model.commitFeedback(content);
    }

    @Override
    public void commitFeedbackSuccess() {
        view.commitFeedbackSuccess();
    }

    @Override
    public void commitFeedbackFailed() {
        view.commitFeedbackFailed();
    }
}
